<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script type="text/javascript">
    wx.config({
        debug: false,
        appId: '{$signPackage.appId}',
        timestamp: '{$signPackage.timestamp}',
        nonceStr: '{$signPackage.nonceStr}',
        signature: '{$signPackage.signature}',
        jsApiList: ['onMenuShareTimeline', 'onMenuShareAppMessage']
    });    
    wx.ready(function () {
    	  // 1 判断当前版本是否支持指定 JS 接口，支持批量判断
    	    wx.checkJsApi({
    	      jsApiList: [
    	        'getNetworkType',
    	        'previewImage',
    	        'onMenuShareTimeline',
    	        'onMenuShareAppMessage',
    	        'onMenuShareQQ',
    	        'onMenuShareWeibo'
    	      ],
    	      success: function (res) {
    	        //alert(JSON.stringify(res));
    	      }
    	    });
    	  var shareData = {
			//'{$shareinfo.description}',
    	    title: '{$atcdail['bn_zhiwei']}',
    	    desc: '{$atcdail['bn_description']}',
    	    link: '',

    	    imgUrl: 'http://h5.hrtv.cn{$atcdail['bn_pic']}',
    	    trigger: function (res) {
    	       //alert('用户点击发送给朋友');
    	    },
    	    success: function (res) {
    	       //alert('已分享');
    	    },
    	    cancel: function (res) {
    	       //alert('已取消');
    	    },
    	    fail: function (res) {
    	       //alert(JSON.stringify(res));
    	    }
    	  };
    	  wx.onMenuShareAppMessage(shareData);
    	  wx.onMenuShareTimeline(shareData);
    	  wx.onMenuShareQQ(shareData);
    	  wx.onMenuShareWeibo(shareData);
    	});
    	wx.error(function (res) {
    	  //alert(res.errMsg);
    	});
</script>